﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;

namespace Commander.Portal.Models {
  public class DashboardModel {
    public string Owner { get; set; }
    public List<ProjectModel> Projects { get; set; }
    public PerformanceHistoryModel PerfHistory { get; set; }
    public DashboardModel() {
      Projects = new List<ProjectModel>();
    }
  }

  public class ProjectModel {
    public Guid Id { get; set; }
    public string ProjectName { get; set; }
    public ProjectFile Binary { get; set; }
    public List<ProjectFile> SourceFiles { get; set; }
    public ProjectReport Report { get; set; }

    public ProjectModel() {
      SourceFiles = new List<ProjectFile>();
      Id = Guid.NewGuid();
    }
  }

  public class PerformanceHistoryModel {
    public int SpectrumValue { get; set; }
  }

  public class ProjectReport {
    public DateTime LastRunDate { get; set; }
    public SmellList SmellsFound { get; set; }
    public SmellList PreviousSmellsFound { get; set; }
    public SmellList SmellsEliminated { get; set; }
    public int ComputerChallenge { get; set; }//AI can reduce number of smell to it to xxx
    public XElement HTMLDetails { get; set; }
  }

  public class SmellList: List<SmellInformation> {//to be replaced with Defect
  }

  public class SmellInformation {
  }

  public class ProjectFile {
    public Guid Id { get; set; }
    public string FileName { get; set; }
    public string FilePath { get; set; }
    public ProjectFile() {
      Id = Guid.NewGuid();
    }
  }
}